<template>
  <div>
    <!-- 面包屑导航区域 -->
    <bread-crumb :breadContent="breadContent"></bread-crumb>

    <!-- 卡片视图区域 -->
    <el-card>
      <el-table border stripe :max-height="pageHeight - 20" :data="warehouseList">
        <el-table-column label="仓库ID" align="center" prop="id"></el-table-column>
        <el-table-column label="仓库名称" align="center" prop="name"></el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        breadContent: ["仓库管理", "仓库列表"],
        warehouseList:[], // 仓库列表  
      }
    },
    methods:{
      async getWarehouseList(){
        const {data:res} = await this.$http.get('warehouse/list')
        if(res.status !== 200) return this.$message.error("获取仓库列表失败！")
        this.warehouseList = res.data
        console.log(this.warehouseList)
      },
    },
    created(){
      this.getWarehouseList()
    }
  }
</script>

<style lang="less" scoped>

</style>